package com.hanxiaozhang.system.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 〈一句话功能简述〉<br>
 * 〈菜单,部门树〉
 *
 * @author hanxinghua
 * @create 2021/4/1
 * @since 1.0.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TreeDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * id,不能重复
     */
    private Long key;

    /**
     * value,不能重复
     */
    private Long value;

    /**
     * 父id
     */
    @JsonIgnore
    private Long parentId;

    /**
     * 菜单名称
     */
    private String title;

    /**
     * 禁止勾选checkbox，并且禁止onSelect响应
     */
    private Boolean disabled;

    /**
     * 禁止勾选checkbox
     */
    private Boolean disableCheckbox;

    /**
     * 孩子节点
     */
    private List<TreeDTO> children;


}
